package cn.wolfcode.shop.cloud.feign;

import cn.wolfcode.shop.cloud.common.Result;
import cn.wolfcode.shop.cloud.domain.Goods;
import cn.wolfcode.shop.cloud.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Set;

@RestController
public class GoodsControllerClient implements GoodsFeignApi{

    @Autowired
    private IGoodsService goodsService;


    @Override
    public Result<List<Goods>> queryGoods(Set<Long> goodsId) {
        List<Goods> goods = goodsService.queryGoods(goodsId);
        return Result.success(goods);
    }
}
